﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Tanmia.Core;
using FluentNHibernate.Mapping;

namespace Tanmia.NHibernate.Mapping
{
    public class RepositoryMap : ClassMap<Repository>
    {
        public RepositoryMap()
        {
            Table("Repository");

            Id(x => x.RepositoryID).Not.Nullable().GeneratedBy.Identity();

            Map(x => x.Name).Not.Nullable().Unique().Length(128);
            Map(x => x.Address).Not.Nullable().Length(1024);
            Map(x => x.CreateDate).Not.Nullable().Not.Update();
            Map(x => x.Note).Nullable().Length(2048);
        }
    }
}
